package zunyi05;

/**
 * 学生类
 */
public class Student extends Person {
    private String sex;

    public Student(String sex) {
        this.sex = sex;
    }

    public Student(String name, int age, String sex) {
        super(name, age);
        this.sex = sex;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public void showInfo(){
        System.out.println(" 姓名："+super.getName()+" 年龄："+super.getAge()+" 性别："+sex);
    }
}
